﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace Automator.Tasks.Core
{
    public class TaskCollection: ObservableCollection<Task> 
    {
        public TaskCollection(): base() { }
        public TaskCollection(List<Task> list): base(list) { }
        public TaskCollection(IEnumerable<Task> collection): base(collection) { }        
    }
    
    public class ReadOnlyTaskCollection: ReadOnlyObservableCollection<Task> 
    {
        public ReadOnlyTaskCollection(TaskCollection collection): base(collection) { }
    }

    public class TaskAttributesCollection : KeyedCollection<string, TaskAttributeDefinition>
    {
        protected override string GetKeyForItem(TaskAttributeDefinition item)
        {
            return item.Key;
        }
    }
}
